x86: avoid invalid phys_proc_id reference
authorChao Peng <chao.p.peng@linux.intel.com>
Mon, 13 Jul 2015 11:46:48 +0000 (13:46 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 13 Jul 2015 11:46:48 +0000 (13:46 +0200)
commit42b79d4ad84da0928f11c4b265eb30cece5fe2fb
treea362ef02de3f3720e59d3b459b072f2450212eed
parentdbe6530f4615195ba0afed555e5d46f93ea61eb8
x86: avoid invalid phys_proc_id reference

phys_proc_id is invalidated in remove_siblinginfo() which gets called
before cpu_smpboot_free(). This means calling cpu_to_socket(cpu) in
cpu_smpboot_free() is not possible to be correct.

This patch moves the invalidating of phys_proc_id from
remove_siblinginfo() to cpu_smpboot_free() so that cpu_to_socket(cpu)
can be used in cpu_smpboot_free().

The same is done for cpu_core_id/compute_unit_id and due to that
cpu_sibling_setup_map is private to the file so it's moved as well.

Reported-by: Dario Faggioli <dario.faggioli@citrix.com>
Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Chao Peng <chao.p.peng@linux.intel.com>
xen/arch/x86/smpboot.c